<template>
	<div class="settings">
		<el-form :model="data" label-position="top" label-width="50px">
			<el-form-item label="背景(整体):">
				<el-color-picker v-model="data.web.background" show-alpha :predefine="data.predefineColors" />
				<el-input v-model="data.web.background" class="rgbinput" placeholder="Please Input" />
			</el-form-item>
			<el-form-item label="背景(局部):">
				<el-color-picker v-model="data.web.Contentbackground" show-alpha :predefine="data.predefineColors" />
				<el-input v-model="data.web.background" class="rgbinput" placeholder="Please Input" />
			</el-form-item>
			<el-form-item label="默认文字颜色：">
				<el-color-picker v-model="data.web.color" show-alpha :predefine="data.predefineColors" />
				<el-input v-model="data.web.color" class="rgbinput" placeholder="Please Input" />
			</el-form-item>
			<el-form-item label="网站默认语言：">
				<el-radio-group v-model="data.web.language" class="ml-4">
					<el-radio label="zh" size="large">简体中文</el-radio>
					<el-radio label="en" size="large">English</el-radio>
				</el-radio-group>
			</el-form-item>
		</el-form>
	</div>
</template>
<script>
	// 这里要把index 和list 传给组件  组件修改时 实时传回
	import Tiptap from '@/components/Tiptap.vue'
	export default {
		components: {
			Tiptap,
		},
		props: ['data'],
		data() {
			return {
				radio: this.$i18n.locale,
				photo: false,
				key: 0,
			}
		},
		methods: {
			senddata(content) {
				this.data.web.content[this.radio] = content
			},
		},
		mounted() {
			// this.data.web['content']['zhongguo'] = '999'
			// this.data['ceshi'] = '新增的无需设置  直接在这里增加一个属性即可  拖拽页就没那么麻烦了'
		},
	}
</script>
<style scoped>
	.settings .rgbinput {
		width: 150px;
		margin-left: 10px;
	}

	.i18nradio {
		width: 100%;
		margin-bottom: 10px;
		align-items: center;
		justify-content: center;
	}
</style>
